package com.ssn.factory.db;

public class UserDao {
    private IDBFactory factory;

    public void setFactory(IDBFactory factory) {
        this.factory = factory;
    }


    public void getAll(){
        this.factory.DBConnection().doConnect();
        System.out.println("已经连接到数据库");
        this.factory.DBCommand().doCommand();
        System.out.println("执行数据库语句");
        this.factory.DBReader().doReader();
        System.out.println("拿到所有用户");
    }
}
